﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using cbelo.Models;
using cbelo.Helpers;

namespace cbelo.Controllers
{
    public class TapaLancheController : Controller
    {
        //
        // GET: /TapaLanche/

        tapaRepositorio tapaRepositorio = new tapaRepositorio();

        public ActionResult TapaLanche()
        {
            var alldata = tapaRepositorio.Select();
            var paginateddata = new PaginatedListPages<tapalanche>(alldata, 0, HelpersConstants.MaxPageSize);

            return View(paginateddata);
        }

        public ActionResult TapaLancheDetails(int page)
        {
            var alldata = tapaRepositorio.Select();
            var paginateddata = new PaginatedListPages<tapalanche>(alldata, page, HelpersConstants.MaxPageSize);

            return View(paginateddata);
        }

    }
}
